package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.mapper.CheckGroupItemMapper;
import com.itheima.pojo.CheckGroupItem;
import com.itheima.service.CheckGroupItemService;
import org.apache.dubbo.config.annotation.Service;

@Service
public class CheckGroupItemServiceImpl extends ServiceImpl<CheckGroupItemMapper,CheckGroupItem> implements CheckGroupItemService {

    @Override
    public Long[] selectItemIds(long groupId) {
        return this.baseMapper.selectItemIds(groupId);
    }

    @Override
    public boolean deleteByGroupId(long groupId) {
        QueryWrapper<CheckGroupItem> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("group_id",groupId);
        return this.remove(queryWrapper);
    }
}
